<template>
  <div class="d_bottom_bar">
    <div class="bottomItem">
      <span class="d_bottom_img1"></span>
      <div class="detail_font">客服</div>
    </div>
    <div class="bottomItem">
      <span class="d_bottom_img2"></span>
      <div class="detail_font">购物车</div>
    </div>
    <div class="bottomItem">
      <img src="~assets/img/detail/collect.svg" class="d_bottom_img3">
      <div class="detail_font">收藏</div>
    </div>
    
    <div class="bottomItem2">
      <div @click="addCart">加入购物车</div>
      <div>立即购买</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailBottomBar",
  methods: {
    addCart(){
      this.$emit("addToCart");
    }
  }

}
</script>

<style scoped>
  .d_bottom_bar{
    display: flex;
  }

  .bottomItem{
    flex:1;
    height: 100%;
  }

  .bottomItem img{
    width: 50%;
  }

  .bottomItem2{
    display: flex;
    flex: 4;
    background-color: orange;
    overflow: hidden;
    height: 39px;
    border-radius: 30px;
    margin-top: 5px;
  }

  .bottomItem2 div{
    flex: 1;
    height: 39px;
    line-height: 39px;
    text-align: center;
    color: white;
    font-size: 14px;
  }
  .bottomItem2 div:nth-child(1){
    background-color:orange;
  }

  .bottomItem2 div:nth-child(2){
    background-color:red;
  }

  .d_bottom_img1{
    display: inline-block;
    width: 23px;
    height: 23px;
    background-size: 23px;
    background-image: url("~assets/img/detail/detail_bottom.png");
    background-position: 0px -55px; 
    margin: 5px; 
    margin-bottom: 0px; 
  }
  .d_bottom_img2{
    display: inline-block;
    width: 23px;
    height: 23px;
    background-size: 23px;
    background-image: url("~assets/img/detail/detail_bottom.png");
    background-position: 0px -103px;  
    margin: 5px;
    margin-bottom: 0px; 
  }
  .d_bottom_img3{
    margin: 5px;
    margin-bottom: 0px; 
  }
  .detail_font{
    font-size: 12px;
    padding-right: 11px;
    text-align: center;
  }
</style>